// run: $exec < input
// opt: 0
// flag: -g
#include <iostream>
#include <string>
#include <vector>

std::vector<int> ans;

int main()
{
	std::ios::sync_with_stdio(false);
	std::string s;
	std::cin >> s;
	int count = 0;
	int last = s.size() - 1;
	for (; last >= 0; last--)
		if (s[last] == '#') break;
	for (int i = 0; i < last; i++) {
		if (s[i] == '(') count++;
		else if (s[i] == ')') {
			if (!count) { std::cout << "-1\n"; return 0; }
			count--;
		} else if (s[i] == '#') {
			if (!count) {
				std::cout << "-1\n"; return 0;
			}
			ans.push_back(1);
			count--;
		}
	}
	int count2 = 0;
	for (int i = s.size() - 1; i > last; i--)
		if (s[i] == ')') count2++;
		else if (s[i] == '(') {
			if (!count2) {
				std::cout << "-1\n";
				return 0;
			}
			count2--;
		}
	if (count2 >= count) std::cout << "-1\n";
	else {
		ans.push_back(count - count2);
		for (auto i : ans) std::cout << i << '\n';
	}
}

